<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        *{
            margin: 0px;
            padding: 0px;
            font-family: 宋体;
        }
        html,body{
            width: 100%;
            height: 100%;
        }
        #container{
            width: 100%;
            height: 100%;

            background-color: #59375A;

            display: flex;
            justify-content: center;
            align-items: center;
        }
        #container #login{
            width: 600px;
            display: flex;
            flex-direction: column;
        }
        #container #login header{
            width: 100%;
            flex:0 0 80px;
            background-color: #6D4A70;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: white;
            font-weight: bolder;
            padding: 0 30px;
            box-sizing: border-box;
        }
        #container #login header h3{
            font-weight: 700;
            font-size: 30px;
        }
        #container #login header span{
            font-size: 15px;
            font-weight: bold;
        }

        #container #login #form_body{
            width: 100%;
            flex:1;
            background-color: #F2F2F2;
            display: flex;
            justify-content: space-around;
            align-items: center;
            flex-direction: column;
            box-sizing: border-box;
            padding-top: 50px;
        }
        #container #login #form_body input{
            width: 80%;
            height: 50px;
            border: 1px solid #666;
            border-radius: 5px;
            margin-bottom: 20px;
            box-sizing: border-box;
            padding-left: 10px;
            font-size: 15px;
            color: #666;
            background-size: 20px;
            background-repeat: no-repeat;
            background-position: 95% center;
            /*background-position-x: 95%;*/
            /*background-position-y: center;*/
            outline: none;
        }
        #container #login #form_body #username{
            background-image: url("img/ic_input_name.png");
        }
        #container #login #form_body #userpwd{
            background-image: url("img/ic_input_password.png");
        }
        #container #login #form_body footer{
            width: 80%;
            height: 80px;
            display: flex;
            align-items: center;
        }
        #container #login #form_body footer button{
            width: 120px;
            height: 45px;
            background-color: #6D4A70;
            border: 1px solid #6D4A70;
            border-radius: 5px;
            font-size: 20px;
            color: white;
            font-weight: 500;
            margin-right: 15px;
            cursor: pointer;
        }
        #container #login #form_body footer a{
            text-decoration: none;
            font-size: 15px;
            color: #666;
        }
    </style>
</head>
<body>
<form id="login_form" action="" method="get"></form>
<div id="container">
    <div id="login">
        <header>
            <h3>Login Form</h3>
            <span>&times;</span>
        </header>
        <div id="form_body">
            <input type="text" form="login_form" id="username"
                   placeholder="Username" required pattern="[0-9][a-z0-9]{5,11}">
            <input type="password" form="login_form" id="userpwd" placeholder="Password"
                   required pattern="[a-zA-Z0-9]{6,12}">
            <footer>
                <button  form="login_form">sing in</button>
                <a href="">Lost your Password？</a>
            </footer>
        </div>
    </div>
</div>
</body>
</html>

